<html xmlns:th="http://www.thymeleaf.org">
<div th:fragment="pagination">
    <div class="container">

        <table>
            <tr>
                <td><a th:href="">首页</a></td>
                <td th:switch="${pageInfo.pageNum}">
                    <p th:case="1"> <a th:href="">上一页</a></p>
                    <p th:case="*"><a th:href="">上一页</a></p>
                </td>
                <td th:switch="${pageInfo.pageNum}">
                    <p th:case="${pageInfo.pages}"><a th:href="">下一页</a></p>
                    <p th:case="*"><a th:href="@{/goods/page(pageNum=${pageNum+1})}">下一页</a></p>
                </td>
                <td><a th:href="">尾页</a></td>
            </tr>
        </table>

    </div>
</div>